class Category < ActiveRecord::Base

  #【参数】
  #【返回值】
  #【注意】
  #【作者】 by ljl 2012.08.27
  def self.options_for_select
    options = []
    categories = Category.all
    if categories.present?
      options = categories.collect{ |b| [b.name.to_s, b.id] }
    end
    return options
  end
  
end
